<%- @view_title = "Edit Job" -%>
<%- @current_tab_name = "admin" -%>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%= render :partial => "shared/head" %>
</head>
<body id="<%= page_name %>" class="<%= page_name %>" <%= render "shared/body_data_attrs" %>>
<div class="page-wrap">
<div id="body_bg">
    <%= render :partial => "shared/header" %>

    <div id='body_content'>
        <div class="messaging_wrapper" id="messaging_wrapper">
            <%= render :partial => "shared/flash_message" %>
            <%= render :partial => "shared/config_save_actions", :locals => {:scope => {}} -%>
        </div>

        <%= render :partial => 'layouts/pipelines/breadcrumb_top' %>

        <%= content_wrapper_tag %>
<div class="row">
        <div class="admin_wrapper">
            <div class="admin_sidebar general">
                <%= render :partial => "admin/shared/pipeline_tree.html", :locals=> {:scope=> {:pipeline => @pipeline}} %>
            </div>
            <div class="admin_workspace has_tree_view">
                <div class="pipeline_header">
                    <h3 class="title entity_title">
                        <%= link_to @pipeline.name(), pipeline_edit_path(:current_tab => 'general'), :class => 'wrapped_word' %> &raquo;
                        <%= link_to @stage.name(), admin_stage_edit_path(:current_tab => 'settings') %> &raquo;
                        <%= @job.name() -%>
                    </h3>
                </div>
                <div class="sub_tabs_container <%=params[:current_tab]-%>">
                    <%= render :partial => "admin/jobs/job_navigation" %>
                </div>
                <div id="form_parent">
                    <%= yield %>
                </div>
            </div>
        </div>

        <%= render :partial => "admin/shared/dirty_form", :locals => {:scope => {:form_id => 'job_edit_form', :reset_id => "reset_form"}} %>
</div>
        <%= end_content_wrapper %>


    </div>
</div>
</div>
<%= render :partial => 'navigation_elements/footer' %>

</body>

<script type="text/javascript">
  jQuery(document).ready(function () {
    if (<%= @is_config_repo_pipeline || false %>) {
      Util.disableAllFormElementsFor(".admin_wrapper");
    }
  });
</script>

<% unless @in_pipeline_group_edit %>
    <script type="text/javascript">
        AjaxRefreshers.addRefresher(new AjaxRefresher("<%= pause_info_refresh_path(:pipeline_name => @pipeline.name()) -%>"), true);
    </script>
<% end %>
</html>
